Confirm a memory-space purge (step 2 of 2) [Cloud-only]
curl --request POST \
--url https://api.evermind.ai/api/v2/memory/purge/confirm \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"nonce": "<string>"
}
'import requests
url = "https://api.evermind.ai/api/v2/memory/purge/confirm"
payload = { "nonce": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({nonce: '<string>'})
};
fetch('https://api.evermind.ai/api/v2/memory/purge/confirm', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.evermind.ai/api/v2/memory/purge/confirm",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'nonce' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.evermind.ai/api/v2/memory/purge/confirm"
payload := strings.NewReader("{\n \"nonce\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.evermind.ai/api/v2/memory/purge/confirm")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"nonce\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.evermind.ai/api/v2/memory/purge/confirm")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"nonce\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"request_id": "<string>",
"data": {
"job_id": "<string>",
"status": "queued",
"scope": "space",
"created_at": "2023-11-07T05:31:56Z",
"app_id": "<string>",
"project_id": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"heartbeat_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"steps": [
{
"store": "<string>",
"state": "pending",
"deleted": 0,
"error": "<string>"
}
]
}
}{}{}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{}{}Purge
Confirm a memory-space purge (step 2 of 2) [Cloud-only]
Permanent — there is no undo. Step 2 of 2: confirms the nonce from POST /purge and queues the purge (202). The scope is the one the nonce was issued for.
From this moment every write to the memory space (add, flush, delete, update, feedback, tags, knowledge changes) is rejected with 409 purge_in_progress until the purge ends; reads keep working and may return partial results. Poll GET /purge/{job_id} for progress.
Only one purge per memory space runs at a time: confirming while one is queued or running returns that job. An unknown, expired or already used nonce is 404 purge_nonce_invalid.
POST
/
api
/
v2
/
memory
/
purge
/
confirm
Confirm a memory-space purge (step 2 of 2) [Cloud-only]
curl --request POST \
--url https://api.evermind.ai/api/v2/memory/purge/confirm \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"nonce": "<string>"
}
'import requests
url = "https://api.evermind.ai/api/v2/memory/purge/confirm"
payload = { "nonce": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({nonce: '<string>'})
};
fetch('https://api.evermind.ai/api/v2/memory/purge/confirm', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.evermind.ai/api/v2/memory/purge/confirm",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'nonce' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.evermind.ai/api/v2/memory/purge/confirm"
payload := strings.NewReader("{\n \"nonce\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.evermind.ai/api/v2/memory/purge/confirm")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"nonce\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.evermind.ai/api/v2/memory/purge/confirm")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"nonce\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"request_id": "<string>",
"data": {
"job_id": "<string>",
"status": "queued",
"scope": "space",
"created_at": "2023-11-07T05:31:56Z",
"app_id": "<string>",
"project_id": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"heartbeat_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"steps": [
{
"store": "<string>",
"state": "pending",
"deleted": 0,
"error": "<string>"
}
]
}
}{}{}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{}{}Authorizations
Body
application/json
Was this page helpful?

